onload = () => {
    loadCSS("../css/fontello.css", "bootstrap5-icon");
    loadCSS("../css/bootstrap5.min.css", "bootstrap5");
    loadScript("../js/bootstrap5.bundle.min.js")
        .then(() => loadScript("../js/crud.js")).then(() => {
        let orgOperator = new Crud({
            module: "organization",
            hasCheckbox: true,
            iterators: [],
            opsButton: ["new"],
            search: [{"caption": "Code", "type": "text", "name": "code[]", class: "col-3"},
                {"caption": "Full Name", "type": "text", "name": "fullname", class: "col-3"}
            ],
            listField: [{"caption": "ID", "field": "organizationId"}, {"caption": "PK", "field": "pk"}, {
                "caption": "Code", "field": "code"
            }, {"caption": "Full Name", "field": "fullname"}],
            editFields: [
                {"name": "code", "placeHolder": "code", "required": "required"},
                {"name": "pk", "placeHolder": "PK in cargo wise", "required": "required"},
                {caption: "Full Name:", "name": "fullname", "placeHolder": "Full name", "required": "required"}
            ]
        });
        orgOperator.init()
    }).catch((err) => console.error(err));
}
